//============================================================================
// Copyright (C) 2010 Brett R. Jones
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================

package com.roguetreasure.destroytheworld;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.app.Activity;
import android.widget.Button;

public class ActivitySdCard extends Activity
{
	//=== activity vars ===//
	public static final String LOG_TAG = "TodActivitySdCard:";
	
	//=== vars ===//
 	// buttons
 	Button 			m_oExitBut = null;
 	Button 			m_oTryAgainBut = null;

    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        setContentView(R.layout.sdcard);
        super.onCreate(savedInstanceState);
         
	 	this.m_oExitBut = (Button)this.findViewById(R.id.sdcard_exit_button);
	 	this.m_oExitBut.setOnClickListener(new OnClickListener() {
	 	  public void onClick(View v) {
	 		 OnExitButClick(v);
	 	  }
	 	});
	 	this.m_oTryAgainBut = (Button)this.findViewById(R.id.sdcard_ok_button);
	 	this.m_oTryAgainBut.setOnClickListener(new OnClickListener() {
	 	  public void onClick(View v) {
	 		 OnTryAgainButClick(v);
	 	  }
	 	});
    }
    
    //! Implement the OnClickListener callback    
    public void OnExitButClick(View v) 
    {  
    	finish();
    }
    
    //! Implement the OnClickListener callback    
    public void OnTryAgainButClick(View v) 
    {  
    	ActivitySdCard.this.setResult(RESULT_OK);
		finish();
    }
    
    //! Implement the OnClickListener callback    
    public void OnContinueClick(View v) 
    {  
    	Intent myIntent = new Intent();
    	myIntent.putExtra( "doanyway", true );
    	ActivitySdCard.this.setResult(RESULT_OK, myIntent);
		finish();
    }

}
